﻿function addBlog() {
	var btitle = document.getElementById("title");
	var btitleValue = btitle.value;
	var bcontent = document.getElementById("content");
	var bcontentValue = bcontent.value;

	if (btitleValue == "") {
		alert("请输入标题");
		return false;
	} else {
		if (bcontentValue == "") {
			alert("请输入博文");
			return false;
		}
	}
}

function addUsers() {
	var uname = document.getElementById("uname");
	var unameValue = uname.value;
	var upassword = document.getElementById("upassword");
	var upasswordValue = upassword.value;
	var upassword1 = document.getElementById("upassword1");
	var upassword1Value = upassword1.value;

	if (unameValue == "") {
		alert("请输入用户名");
		return false;
	}
	if (upasswordValue == "") {
		alert("请输入密码");
		return false;
	}
	if (upassword1Value == "") {
		alert("请确认密码");
		return false;
	}
	if (upasswordValue != upassword1Value) {
		alert("两次输入的密码不一致");
		return false;
	}
}

function loginUsers()
{
	var uname = document.getElementById("uname");
	var unameValue = uname.value;
	var upassword = document.getElementById("upassword");
	var upasswordValue = upassword.value;
	if (unameValue == "") {
		alert("请输入用户名");
		return false;
	}
	if (upasswordValue == "") {
		alert("请输入密码");
		return false;
	}
	}

function del() {
	var msg = "确认删除？";
	if (confirm(msg) == true) {
		return true;
	} else {
		return false;
	}
}
